package org.feisoft.transaction;

import org.feisoft.transaction.xa.TransactionId;

import java.util.List;

public interface TransactionRepository
{

    // active-transaction & error-transaction
    public void putTransaction(TransactionId xid, Transaction transaction);

    public Transaction getTransaction(TransactionId xid);

    public Transaction removeTransaction(TransactionId xid);

    // error-transaction
    public void putErrorTransaction(TransactionId xid, Transaction transaction);

    public Transaction getErrorTransaction(TransactionId xid);

    public Transaction removeErrorTransaction(TransactionId xid);

    public List<Transaction> getErrorTransactionList();

    public List<Transaction> getActiveTransactionList();

}
